﻿using Interface;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Model.Enum;
using Model.Other;
using webapi.Config;

namespace webapi.Controllers
{
    [ApiController]
    [Route("api/[controller]/[action]")]
    public class FileController : BaseController
    {
        IFileService _fileService;
        public FileController(IFileService fileService)
        {
            _fileService = fileService;
        }
        public async Task<ApiResult> uploadFile(List<IFormFile> file ,UploadMode mode)
        {
            return ResultHelper.success(await _fileService.Uoload(file, mode));
        }
    }
}
